import {
    paint,
    penBar,
    rubberBar
} from './index';

import {
    //线上版
    paintPro,
    penBarPro,
    rubberBarPro
} from './indexPro';

window.onload=function(){
    document.addEventListener("touchmove", function (e) {
        e.preventDefault();
    }, { passive: false, capture: false });//禁止页面滑动

        function getQueryString(name){
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)return  unescape(r[2]); return null;
        }
        // const url='https://rzkeji.oss-cn-shenzhen.aliyuncs.com/web/steel/example.jpg'
        const url1='https://www.gangerp.com/api/file/show-image/605'
        const url2='./1.jpg'
        const url3='https://www.gangerp.com/api/file/show-image/441'

        if(getQueryString('imgId')){
            new paint(getQueryString('imgUrl'),getQueryString('imgIndex'),getQueryString('imgId'))
            new penBar();
            new rubberBar();
        }
        // else{
        //     new paintPro(getQueryString('imgUrl'),getQueryString('imgIndex'),getQueryString('imgId'))
        //     new penBarPro();
        //     new rubberBarPro();
        // }
    
}